package com.smart.manager.weixin.mp.cfg;

import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Administrator
 */
@Configuration
@RequiredArgsConstructor
@Log4j2
public class WeixinMpCfg {


    /**
     * 根据当前域名获取公众号配置信息
     */
    @Bean
    @ConditionalOnMissingBean
    public WxMpService getWxMpService() {
        return new WxMpServiceImpl();
    }


}
